package com.midea.collection;

import java.util.Enumeration;
import java.util.Vector;

public class Demp_Vector {
    /**
     * @param args
     */
    public static void main(String[] args) {
        Vector v = new Vector();
        v.addElement("a");
        v.addElement("b");
        v.addElement("c");
        v.addElement("d");

        Enumeration en = v.elements();					//获取枚举
        System.out.println(en.toString());
        while(en.hasMoreElements()) {					//判断集合中是否有元素
            System.out.println(en.nextElement());		//获取集合中的元素
        }
    }
}
